#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg17000_csbuf.py
# package ptl



# message Req17001
class Req17001:
	def __init__(self):
		self.protoid = 17001
		self.playerId = 0
		self.id = 0
		self.payType = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		writer.setUint32(self.id, 2)
		writer.setUint32(self.payType, 3)
		writer.setUint32(self.count, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		self.id = reader.getUint32(2)
		self.payType = reader.getUint32(3)
		self.count = reader.getUint32(4)
# message Resp17001
class Resp17001:
	def __init__(self):
		self.protoid = 17001
		self.playerId = 0
		self.status = 0
		self.id = 0
		self.count = 0
		self.payType = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		writer.setUint8(self.status, 2)
		writer.setUint32(self.id, 3)
		writer.setUint32(self.count, 4)
		writer.setUint32(self.payType, 5)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		self.status = reader.getUint8(2)
		self.id = reader.getUint32(3)
		self.count = reader.getUint32(4)
		self.payType = reader.getUint32(5)
# message Req17002
class Req17002:
	def __init__(self):
		self.protoid = 17002
		self.playerId = 0
		self.id = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		writer.setUint32(self.id, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		self.id = reader.getUint32(2)
# message Resp17002
class Resp17002:
	def __init__(self):
		self.protoid = 17002
		self.playerId = 0
		self.perLimit = 0
		self.svrLimit = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		writer.setUint32(self.perLimit, 2)
		writer.setUint32(self.svrLimit, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		self.perLimit = reader.getUint32(2)
		self.svrLimit = reader.getUint32(3)
# message GoodsItem
class GoodsItem:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.limit = 0

	def Marshal(writer):
		writer.setUint64(self.id, 1)
		writer.setUint32(self.limit, 2)

	def Unmarshal( reader):
		self.id = reader.getUint64(1)
		self.limit = reader.getUint32(2)
# message Req17003
class Req17003:
	def __init__(self):
		self.protoid = 17003
		self.playerId = 0
		self.area_type = 0
		self.updateT = 0
		self.level = 0
		self.vip = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		writer.setUint32(self.area_type, 2)
		writer.setUint32(self.updateT, 3)
		writer.setUint32(self.level, 4)
		writer.setUint32(self.vip, 5)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		self.area_type = reader.getUint32(2)
		self.updateT = reader.getUint32(3)
		self.level = reader.getUint32(4)
		self.vip = reader.getUint32(5)
# message Resp17003
class Resp17003:
	def __init__(self):
		self.protoid = 17003
		self.playerId = 0
		self.goodsItems = []
		self.updateT = 0
		self.status = 0
		self.area_type = 0

	def Marshal(writer):
		writer.setUint64(self.playerId, 1)
		countgoodsItems = len(self.goodsItems)
		writer.setArray(countgoodsItems, 2)
		for i in range(countgoodsItems):
			writer.setMessage(0)
			self.goodsItems[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.updateT, 3)
		writer.setUint8(self.status, 4)
		writer.setUint32(self.area_type, 5)

	def Unmarshal( reader):
		self.playerId = reader.getUint64(1)
		for i in range(reader.getArray(2)):
			msg = GoodsItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.goodsItems.append(msg)
		self.updateT = reader.getUint32(3)
		self.status = reader.getUint8(4)
		self.area_type = reader.getUint32(5)
